###
# 处理数据
###

region = './result/total.txt'  # 元数据表格
uniq = './result/uniq.txt'  # 数据唯一结果
repeat = './result/repeat.txt'  # 重复数据

line_dict_uniq = dict()
funiq = open(uniq, 'a')
frepeat = open(repeat, 'a')
with open(region, 'r') as fd:
    for line in fd:
        key = line.split('  ')[2]
        if key not in line_dict_uniq.keys():
            # print line_dict_uniq.keys()
            line_dict_uniq[key] = line
            funiq.write(line)
        else:
            frepeat.write(line)
